import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '../views/HomeView.vue';

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    redirect: '/home',
  },
  {
    path: '/home',
    name: 'home',
    redirect:'/home/movies',
    component: Home,
    // component: () => import('../views/HomeView.vue'),
    children:[
      {
        path:'movies',
        name:'movies',
        meta:{
          info:1
        },
        component: () => import('@/views/home/movies/Movies.vue'),
      },
      {
        path:'theaters',
        name:'theaters',
        component: () => import('@/views/home/theaters/Theaters.vue'),
      },
      {
        path:'profile',
        name:'profile',
        component: () => import('@/views/home/profile/Profile.vue'),
      }
    ]
  },
  {
    path: '/citypicker',
    name: 'citypicker',
    component: () => import('@/views/citypicker/CityPicker.vue'),
  },
  {
    path:'/detail',
    name:'detail'
  },
];

const router = new VueRouter({
  routes,
});

export default router;
